﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using VB.Entries.DataModel;

namespace VB.Entries.SQLManager
{
    public sealed class ConnectionContext : IDisposable, IConnectionContext
    {
        private SqlConnection _connection;
        internal ConnectionContext(SqlConnection connection)
        {
            _connection = connection;
        }
        public VBBlogModelDataContext CreateContext()
        {
            return new VBBlogModelDataContext(_connection);
        }
        public void Dispose()
        {
            _connection.Dispose();
        }
    }
}
